package Demo02;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: YKH
 * Date: 2022-03-27
 * Time: 20:43
 */
public class Person {
    private String name = "张三";
    private int age = 20;
    private String sex = "男";

    public Person() {
        System.out.println( "姓名："+this.name);
        System.out.println("年龄："+ this.age);
        System.out.println( "性别："+this.sex);
    }
    public Person( String name, String sex) {
       this.name = name;
       this.sex = sex;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public int getAge() {
        return age;
    }

    public void setAge(int age) {
        this.age = age;
    }

    public String getSex() {
        return sex;
    }

    public void setSex(String sex) {
        this.sex = sex;
    }
}
